1. Field of the Invention
The present invention relates to an image testing device equipped with brightness measuring capabilities for testing an image of the inner surface of a cylindrical container as a test object which is transmitted by, for example, a conveyor so that foreign substances, dust, scratches, etc. can be successfully detected if they exist on the surface.
In the following figures, if units are assigned the same unit number, then the units are similar or correspond to each other.
2. Description of the Prior Art
FIGS. 1A and 1B show the method of observing a cylindrical container, that is, a test object, which has metallic luster on its inner surface. FIG. 1A is the top view of the cylindrical container, and FIG. 1B is its sectional view. 102 is a cylindrical container. A ring-shaped illuminator 101 illuminates the cylindrical container 102 from above, and the center axis of the illuminator 101 matches that of the cylindrical container 102. When a uniform ring-shaped light is provided by the illuminator 101, the light reflects off the inner surface having the metallic luster. Thus, when the test object is viewed from above, there are concentric light circles (hereinafter referred to as a brightness pattern) generated in the container. FIG. 1A shows a highlighted portion generated when the light of the illuminator directly reflects off the inner surface of the container. The strongest highlight can be detected around a highlighted opening 103 and a highlighted bottom 104.
FIG. 2A shows a scanning line Q-Q1 passing the center of the container shown in FIG. 1A. FIG. 2B shows a graph of the variation of gray levels inside the container along the scanning line Q-Q1. If the scanning line Q-Q1 is turned round the axis of the container, then a graph can be obtained as shown in FIG. 2B. The brightness pattern depends on a test object. The highlighted portion and a dark portion, which is generated when a light does not reflect off the surface toward the viewer, are different in respective cases. However, the feature of generating a concentric bright circle maintains. In the example shown in FIG. 2B, the inner surface of a cylindrical container can be divided into five areas W1 through W5 according to the variation of gray levels. The first area W1 refers to the highlighted opening 103. The second area W2 refers to the upper portion of the inner side of the container where the variation of gray levels is relatively small. The third area W3 receives a small amount of light from the illuminator 101 described by referring to FIG. 1, refers to the lower portion of the inner side of the container, and is darker than other portions. The fourth area W4 refers to the highlighted bottom 104. The fifth area W5 refers to the bottom portion.
With the conventional image testing device of a cylindrical container inner surface test device, each of these areas W1 through W5 is provided with a window, and a threshold is set to detect a defect indicated by a black spot and a white spot depending on the optical characteristics in each area. A method of detecting a defect is, for example, to binarize using a predetermined threshold an 8-bit multivalued gray image signal obtained by A/D converting an analog video signal (analog gray image signal) obtained by scanning an object image; to extract a defect signal by differentiating the video signal by a differentiation circuit as a differentiation method, etc. In the differentiation method, a differentiation signal is issued around the contour of the object. However, the differentiation generates either a forward pulse or a backward pulse around the contour of the object, and generates the forward and backward pulses simultaneously around a small defective portion. Using the above described feature of the differentiation method, a defective portion can be correctly extracted.
That is, assuming that the following expressions exist among point P(i,j) at an object point (coordinate x=i, y=j) of a signal P(x, y) obtained by differentiating the analog gray image signal based on a raster scanning; point P(i-.alpha., j); and point P(i+.beta., j) respectively positioned a picture elements before and .beta. picture elements after the object point in the x direction of the scanning line:
P(i, j)-P(i-.alpha., j)&gt;TH1 and
P(i+.beta., j)-P(i, j)&gt;TH2,
where TH1 is a predetermined threshold (positive number), the object point indicates a black spot with the binarization function value PD(i, j) for use in detecting a defect at the object point set to 1. Otherwise, the object point indicates a normal point with the binarization function value PD(i, j) set to 0.
Generally, the number of containers of, for example, food is very large per time unit in a checking process. If a defect has been detected in a container tester in a production line, then a quick action should be taken to stop the production line. Otherwise, a large number of defective containers can be produced in a short time, thereby causing a serious problem of recovery of the production line. In this case, a longer recovery time requires a larger amount of financial loss correspondingly.
On the other hand, an illuminator which is used to stabilize a test image can be an element of the reliability of determination. That is, the brightness of the light of the illuminator may be lowered as time passes, and has undesired influence on precision. Generally, a test container is captured by a camera using a strobo flashbulb as a light source while it is being conveyed. However, the strobo flashbulb shows an uneven deterioration in brightness and the relationship between the number of flashes and deterioration cannot be calculated exactly.
Therefore, a strobo flashbulb is replaced with a new one at predetermined intervals so that the tester can be appropriately maintained. However, the strobo flashbulb costs rather high, and a unit for properly notifying a user of a timely replacement is earnestly demanded.
Regarding a defective illuminator, a defect can be easily detected, only if the illuminator provides no light at all, by detecting a black spot or a white spot inside a cylindrical container through fixed or difference binarization. However, if the test precision has been lowered through deterioration of brightness, then the tester could recognize all test objects as acceptable containers. In this case, there may arise a serious problem that no correct check is made until an operator recognizes the malfunction of the illuminator.
Frequent periodical maintenance of an illuminator for its strobo flashbulb to reduce such problems requires a high cost.